/*
 * Sound.cpp
 *
 *  Created on: 30/07/2010
 *      Author: alex
 */

#include "Sound.h"

Sound::Sound(const char* file) :
	sound(Mix_LoadWAV(file))
{
}

Sound::~Sound() {
	Mix_FreeChunk(sound);
}

void Sound::play() {
	Mix_PlayChannel(-1, sound, 0);
}

Music::Music(const char *file) :
	music(Mix_LoadMUS(file))
{
}

Music::~Music() {
	Mix_FreeMusic(music);
}

void Music::play(int times) {
	Mix_PlayMusic(music, times);
}
